import urllib.request
import urllib.
from http.cookiejar import CookieJar

headers={
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
}

url = 'http://218.86.103.26:81/CheckCode.aspx'
cookie = CookieJar()
opener = urllib.request.build_opener(urllib.quest.HTTPCookieProcessor)

response=opener.open(url,urllib.parse.urlencode(headers).encode('utf-8'))
html=response.read().decode()
with open ('code.jpg','wb')as f:
    f.write(response.content)
